<?php

/**
 *
 *
 * @version $Id$
 * @copyright 2008
 */


class AssocPDO extends PDO
{
   public function __construct()
   {
      //echo "__construct AssocPDO";
      parent::__construct('mysql:host=mysql5-11;dbname=eassocia', 'eassocia', 'eassocia');
      $this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
      // Pour buffered les requÃªtes
      $this->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);
   }

   public function prepare($sql)
   {
      //echo "prepare";
      $statement = parent::prepare($sql);
      $statement->setFetchMode(PDO::FETCH_ASSOC);
      return $statement;
   }
}

?>